Solve a Sudoku with AI

Overview

In this project, you will be writing code to implement two extensions of our sudoku solver. The first one will be to implement the technique called "naked twins". The second one will be to modify our existing code to solve a diagonal sudoku. To complete this project you will use the tools you learned about in the lesson, and build upon them.

Your goals are to implement the naked twins function, and write an AI agent that will solve the Diagonal Sudoku game.

Project Review Note: This project is partially autograded. Unlike the other projects in the term, if you pass all the automated tests run by the Project Assistant, then your review will be completed automatically -- there will be no human review for passing submissions. If you want to further discuss your code or the project, please do so on the forums, Slack, or during instructor office hours.

** AFTER YOU PASS ALL THE PA TESTS YOU MUST USE THE LINK BELOW TO SUBMIT THE ZIP FILE CREATED BY THE PROJECT ASSISTANT IN ORDER TO COMPLETE THE PROJECT. **

Instructions

  1. Ensure you have setup using the instructions here.
  2. Clone the repository.
  3. Activate the aind conda environment that you set up in the last lesson.
  4. Fill out the functions in solution.py to solve a diagonal sudoku.
  5. Fill out the naked_twins function to solve the Naked Twins problem.
  6. Test that your solution works.
    • Some simple test code is provided (run python -m unittest); you will need to write your own test cases if additional testing is required (which is likely).
    • Udacity's Project Assistant will also give you feedback when you execute udacity submit on the command line from within the project directory. You may submit to the project assistant as many times as you like.

NOTE: The local tests are not the same as the test cases run by the Project Assistant. Passing all of the local tests is a good starting point for submitting to the PA, but you may need to build your own test cases based on the feedback from the PA in order to complete the project.

Using the Project Assistant

  • The AIND conda environment includes the project assistant, but you can also manually install it using pip install udacity-pa from the command line.

  • If you encounter questions or issues while using Project Assistant, please refer to the FAQ, the info page, and the troubleshooting guide.

  • The submission script must be run from inside a valid Udacity project folder. For example:

    1. Open a terminal shell (Terminal, Bash, Git-Bash, cmd.exe, etc., depending on your system)
    2. Activate your conda environment
    $ source activate aind
    (aind) $

    Note: Windows uses the command activate aind, and your prompt will look like DRIVE:\path> instead of $

    1. Change directory to the project folder:
    (aind) $ cd path/to/aind-sudoku
    1. Submit your project:
    (aind) $ udacity submit

    The Project Assistant will print status information including which files are being submitted (ONLY these files should be expected to be available on the PA, and you should NOT attempt to change the list), and upon completion it will leave a zip file & json file containing feedback. If you pass all test cases, then you do not need to submit the zip file in the classroom.

Evaluation

Your submission will be automatically scored against this rubric. All criteria found in the rubric must meet specifications for you to pass.

Submission

When you execute udacity submit the relevant files are zipped into a zipfile with a name like "sudoku-674.zip". Click on the link below and submit that EXACT file to complete the project.